var url = location.search.split('=')[1]
var reldata = '';
var reldata2 = '';
for (var i = 0; i < fdata2.length; i++) {
    var datasmll = '';
    for (var j = 0; j < fdata2[i].url1.length; j++) {
        datasmll += `
            <img src="${fdata2[i].url1[j]}" alt="汤臣倍健春季马丁靴男真皮男靴黄靴工装军靴韩版短靴沙漠靴高帮男鞋大黄靴 头层牛皮" width="58px" height="58px">
            `
    }
    if (url == fdata2[i].iptid) {
        reldata += `




    <div class="one">
    <div class="bg_left">
    <div class="show">
        <img src="${fdata2[i].imgurl}" alt="">
        <div class="mask"></div>
    </div>
</div>


<div class="bg_right">
    <div class="bigshow">
        <div class="bigitem">
            <img src="${fdata2[i].imgurl}" alt="">
        </div>
    </div>
</div>


        <div class="two">
            <span><</span>
            <div>
                ${datasmll}
            </div>
            <span>></span>
        </div>
        <div class="three">
            <input type="radio"><span>对比</span>
            <input type="radio"><span>收藏(${fdata2[i].shou})</span>
            <a href="#">举报</a>
        </div>
    </div>
    <div class="two">
        <h4>${fdata2[i].text}</h4>
        <div class="one">
            <div>
                <div class="one">
                    <small>商城价</small>
                    <h1>${fdata2[i].jinqian2}</h1>
                    <span>降价通知</span>
                </div>
                <div class="two">
                    <small>累计评价：</small><span>${fdata2[i].ping}</span>
                    <span>|</span>
                    <small>累计销量：</small><span>${fdata2[i].shou}</span>
                </div>
            </div>
            <div>
                <div class="one">
                    <small>市场价</small>
                    <strike>￥${fdata2[i].jinqian}</strike>
                </div>
                <div class="two">
                    <small>手机购买</small>
                </div>
            </div>
            <div>
                <div class="one">
                    <small>领券</small>
                </div>
            </div>
        </div>
        <div class="two">
            <div>
                <span>配送</span>
                <div>
                    <span>上海市&nbsp;至</span>
                    <div>河南省&nbsp;郑州市&nbsp;中原区&nbsp;林山寨街道</div>
                    <h3>无货</h3>
                    <span>,此商品暂时售完</span>
                </div>
            </div>
            <div>
                <span>服务</span>
                <div>
                    <a href="#">商创自营</a>
                    <span>发货并提供售后服务。</span>
                    <span>[免运费]</span>
                </div>
            </div>
            <div>
                <span>品牌</span>
                <div>
                    <span>汤臣倍健</span>
                </div>
            </div>
            <div>
                <span>可用积分</span>
                <div>
                    <span>0</span>
                </div>
            </div>
            <div>
                <span>赠送积分</span>
                <div>
                    <span>55</span>
                </div>
            </div>
            <div>
                <span>数量</span>
                <div>
                    <div>
                        <input type="text">
                        <div>
                            <span class="one">^</span>
                            <span class="two">v</span>
                        </div>
                    </div>
                    <span>库存${fdata2[i].kucun}个</span>
                </div>
            </div>
            <div>
                <span>温馨提示</span>
                <div>
                    <img src="https://x.dscmall.cn/storage/data/goods/services_label/正确2.png" alt="" width="16px" height="16px">
                    <span>支持7天无理由退货1</span>
                </div>
            </div>
        </div>
        <button>暂时缺货</button>
    </div>
    <div class="three">
        <span>看了又看</span>
        <div>
            <a href="#"><img src="${fdata2[1].imgurl}" alt="" width="140px" height="140px"></a>
            <span>${fdata2[1].text} 头层牛皮</span>
            <small>${fdata2[1].jinqian2}</small>
        </div>
        <div>
            <a href="#"><img src="${fdata2[5].imgurl}" alt="" width="140px" height="140px"></a>
            <span>${fdata2[5].text}</span>
            <small>${fdata2[5].jinqian2}</small>
        </div>
        <div>
            <a href="#"><img src="${fdata2[9].imgurl}" alt="" width="140px" height="140px"></a>
            <span>${fdata2[9].text}</span>
            <small>${fdata2[9].jinqian2}</small>
        </div>
    </div>
            
            `
        $('#dp-linm').html(reldata)
        if (!fdata2[i].kucun <= 0) {
            $('h3').text('有货')
            $('h3').next().text(null)
            $('.two button').text('立即购买')
        } else {
            $('.two button').text('暂时缺货')
            $('h3').text('无货')
            $('h3').next().text(',此商品暂时售完')
        }
        reldata2 += `
            <div>
            <a class="one" href="#">鞋靴，箱包，钟表，奢侈品 v</a><span>></span>
            <div class="div1">
                <a href="#">时尚女鞋</a>
                <a href="#">流行男鞋</a>
                <a href="#">潮流女包</a>
                <a href="#">精品男包</a>
                <a href="#">功能箱包</a>
                <a href="#">奢侈品</a>
            </div>
            <a class="two" href="#">${fdata2[i].leixing} v</a><span>></span>
            <div class="div2">
                <a href="#">休闲鞋</a>
                <a href="#">增高鞋</a>
                <a href="#">定制鞋</a>
            </div>
            <a class="three" href="#">${fdata2[i].leibie} v</a><span>></span>
            <small>${fdata2[i].text}…</small>
        </div>
        `
        $('#dp-linn').html(reldata2)












    }
}





